package Cliente;

import Cliente.Controlador.GameController;
import Cliente.Modelo.IniciarJuego;
import Cliente.Modelo.Game;
import Cliente.Vista.Constantes;
import Cliente.Vista.Principal_game;
import java.io.*;
import java.util.Properties;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JFrame;

/**
 *
 * @author Jorge Perez
 * @author Esther Castellanos
 */
public class MainClient {
    
     private static Game game;
     public static Properties props=new Properties();;
     
     /**
     * @param args the command line arguments
     */
     
  
    
    public static void main(String args[]) {
         
        
        /*
         * Create and display the form
         */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                game = new Game();
                GameController controller = new GameController(game);
                Principal_game vista = new Principal_game(controller);
                
                game.addObserver(vista);
                

                int idGame = controller.newGame();
                System.out.println(" MAIN CLIENTE, ID GAME: " + idGame);
                controller.startGame(idGame);
                
                vista.setVisible(true);
                vista.setExtendedState(JFrame.MAXIMIZED_BOTH);
                
                
                

               
                
            }
        });
        
}

}
